package com.ikkong.shine.meta.intercept;

import java.util.List;
import java.util.Map;

import com.ikkong.core.aop.AopContext;
import com.ikkong.core.meta.PageIntercept;
import com.ikkong.core.toolbox.Func;
import com.ikkong.core.toolbox.support.BladePage;

public class QueueTpyeInterept extends  PageIntercept {
	/**
	 * 查询后附加字典项
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void queryAfter(AopContext ac) {
		BladePage<Map<String, Object>> page = (BladePage<Map<String, Object>>) ac.getObject();
		List<Map<String, Object>> list = page.getRows();
		
		for (Map<String, Object> map : list) {
			//将is_checkin状态转换成汉字  
			map.put("is_checkin", Func.getDictName(116, map.get("is_checkin")));
			map.put("is_pretriage", Func.getDictName(117, map.get("is_pretriage")));
			map.put("is_reorder", Func.getDictName(118, map.get("is_reorder")));
			map.put("is_reserve", Func.getDictName(119, map.get("is_reserve")));
			map.put("pass_first_flag", Func.getDictName(120, map.get("pass_first_flag")));
			map.put("pass_flag_step", Func.getDictName(121, map.get("pass_flag_step")));
			map.put("pass_max", Func.getDictName(122, map.get("pass_max")));
		}
	}
}
